package com.fsp.blog.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fsp.blog.dao.dos.Archives;
import com.fsp.blog.pojo.Article;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author fushengping
 * @interface ArticleMapper
 * @description
 * @date 2021/11/4 22:42
 */
@Repository
public interface ArticleMapper extends BaseMapper<Article> {
    /**
     * 文章归档
     * @return
     */
    List<Archives> listArchives();

    /**
     * 归档文章列表
     * @param page
     * @param categoryId
     * @param year
     * @param month
     * @return
     */
    IPage<Article> listArticle(Page<Article> page,
                               Long categoryId,
                               Long tagId,
                               String year,
                               String month);
}
